package com.zjj.learn.algorithmPlus.test.segment2.heap;

import com.zjj.learn.algorithmPlus.segment2.heap.MaxHeap;
import org.junit.Test;

public class TeatMaxHeap {

    @Test
    public void test1(){
        MaxHeap heap = new MaxHeap(12);
        heap.offer(100);
        heap.offer(10);
        heap.offer(99);
        heap.offer(5);
        heap.offer(6);
        heap.offer(98);
        heap.offer(97);
        heap.offer(1);
        heap.offer(2);
        heap.offer(3);
        heap.offer(4);
        heap.offer(96);

        System.out.println("heap = " + heap);

        int poll = heap.poll(3);
        System.out.println("poll = " + poll);
        System.out.println("heap = " + heap);
    }
}
